package com.jxc.service;

import java.util.List;

import org.jfree.chart.JFreeChart;

import com.jxc.model.vo.DataGrid;
import com.jxc.model.vo.VRepertory;
import com.jxc.model.vo.VSalelist;
import com.jxc.model.vo.VSalelistItem;
import com.jxc.model.vo.VUser;

/**
 * @author Administrator
 *
 */
public interface SalelistServiceI {
	
	public Long save(VSalelist vsl);
	
	public VSalelist getSalelistById(Long id);
	
	public List<VSalelistItem> getItemsByIds(String ids);

	public DataGrid datagrid(VSalelist vsl);
	
	/**
	 * 为前端返回datagrid格式的统计数据
	 * @param vsl
	 * @return
	 */
	public DataGrid datagridTotal(VSalelist vsl);
	
	public DataGrid datagridsettlementTotal(VSalelist vsl);

	public void delete(String ids);

	public void update(VSalelist vsl);

	public List<VSalelist> combobox(VSalelist vsl);

	public List<VSalelist> search(VSalelist vsl);

	public List<VSalelistItem> getItems(VSalelist vSalelist);

	public DataGrid datagridNoPage(VSalelist vSalelist);

	public void editModel(VSalelist model);

	public Object findGather(VSalelist model);

	public List<VSalelistItem> findSaleDetail(VSalelist model);

	/**
	 * 获取销售统计数据
	 * @param model
	 * @return
	 */
	public List saleTotal(VSalelist model);

	/**
	 * 根据销售统计数据生成图表
	 * @param vSalelist
	 * @return
	 */
	public JFreeChart getSaleTotalChart(List<Object[]> vsls, VSalelist model);

	/**
	 * 获取商品销售排行数据
	 * @param model
	 * @return
	 */
	public List<Object[]> saleRank(VSalelist model);

	/**
	 * 根据商品销售排行数据生成图表
	 * @param vsls
	 * @param model
	 * @return
	 */
	public JFreeChart getSaleRankChart(List<Object[]> vsls, VSalelist model);

	/**
	 * 为前端返回datagrid格式的销售排行数据
	 * @param vsl
	 * @return
	 */
	public DataGrid datagridRank(VSalelist model);
	/**
	 * 日销售统计
	 * @param model
	 * @return
	 */
	public List saleDayTotal(VSalelist model,VUser user);

	/**
	 * 日销售统计
	 * @param repertories
	 * @param vsl
	 * @param user
	 * @return
	 */
	public DataGrid datagridDayTotal(List<VRepertory> repertories, VSalelist vsl,
			VUser user);

	/**
	 * 日销售折线统计图
	 * @return
	 */
	public JFreeChart saleDayTotalJFreeChat(List<VRepertory> repertories,
			VSalelist model, VUser user);


}
